#include<iostream>
void RestNum(int*a ,int* b);
void SetNum(int*a, int* b, int* c);
int main()
{
	using namespace std;
	char flower[10] = "rose";
	cout << flower[2] << "s are red\n";

	int p = 100;
	int q = 50;
	int* a = nullptr;
	int* b = new int;
	int* c = new int;
	SetNum(a, &p, c);
	SetNum(a, b, c);
	cout << "a = " << *a << " b = " << *b << " c = " << *c << endl;
	return 0;
}

void RestNum(int* a, int* b)
{
	if (a)
	{
		*a = *b;
		std::cout << "RestNum已被调用" << std::endl;
	}
}

void SetNum(int* a, int* b, int* c)
{
	RestNum(a, c);
	a = b;
	c = a;
}
